package com.ssy.lingxi.member.merchant.model.vo.lifecycle.request;

import com.ssy.lingxi.member.merchant.handler.annotation.DateStringFormatAnnotation;
import com.ssy.lingxi.member.merchant.model.vo.basic.request.FileUploadVO;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 会员考察新增VO
 * @author yzc
 * @version 2.0.0
 * @date 2021/5/17
 */
public class MemberInspectAddVO implements Serializable {
    private static final long serialVersionUID = -5352390411750129021L;

    /**
     * 下级会员Id
     */
    @NotNull(message = "下级会员Id要大于0")
    @Positive(message = "下级会员Id要大于0")
    private Long subMemberId;

    /**
     * 下级会员角色Id
     */
    @NotNull(message = "下级会员角色Id要大于0")
    @Positive(message = "下级会员角色Id要大于0")
    private Long subRoleId;

    /**
     * 考察主题
     */
    @NotBlank(message = "考察主题能为空")
    private String subject;

    /**
     * 考察类型 1-入库考察 2-整改考察 3-计划考察 4-其他考察
     */
    @NotNull(message = "考察类型不能为空")
    private Integer inspectType;

    /**
     * 考察日期，格式为yyyy-MM-dd
     */
    @DateStringFormatAnnotation(message = "考察日期格式错误")
    private String inspectDay;

    /**
     * 考察用户Id（考察代表）
     */
    @NotNull(message = "考察代表(用户Id)要大于等于0")
    @PositiveOrZero(message = "考察代表(用户Id)要大于等于0")
    private Long userId;

    /**
     * 考察用户编辑名称
     */
    private String userEditName;

    /**
     * 考察用户编辑手机
     */
    private String userEditPhone;

    /**
     * 考察原因
     */
    @Size(max = 120, message = "考察原因最长120个字符")
    private String reason;

    /**
     * 考察附件
     */
    @Valid
    private List<FileUploadVO> attachments;

    /**
     * 考察评分
     */
    @NotNull(message = "考察评分不能为空")
    @Min(value = 0, message = "考察评分为0-100")
    @Max(value = 100, message = "考察评分为0-100")
    private BigDecimal score;

    /**
     * 考察结果
     */
    @NotBlank(message = "考察结果不能为空")
    @Size(max = 60, message = "考察结果最长60个字符")
    private String result;

    /**
     * 考察报告
     */
    @NotEmpty(message = "考察报告不能为空")
    @Valid
    private List<FileUploadVO> reports;

    public Long getSubMemberId() {
        return subMemberId;
    }

    public void setSubMemberId(Long subMemberId) {
        this.subMemberId = subMemberId;
    }

    public Long getSubRoleId() {
        return subRoleId;
    }

    public void setSubRoleId(Long subRoleId) {
        this.subRoleId = subRoleId;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public Integer getInspectType() {
        return inspectType;
    }

    public void setInspectType(Integer inspectType) {
        this.inspectType = inspectType;
    }

    public String getInspectDay() {
        return inspectDay;
    }

    public void setInspectDay(String inspectDay) {
        this.inspectDay = inspectDay;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserEditName() {
        return userEditName;
    }

    public void setUserEditName(String userEditName) {
        this.userEditName = userEditName;
    }

    public String getUserEditPhone() {
        return userEditPhone;
    }

    public void setUserEditPhone(String userEditPhone) {
        this.userEditPhone = userEditPhone;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public List<FileUploadVO> getAttachments() {
        return attachments;
    }

    public void setAttachments(List<FileUploadVO> attachments) {
        this.attachments = attachments;
    }

    public BigDecimal getScore() {
        return score;
    }

    public void setScore(BigDecimal score) {
        this.score = score;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public List<FileUploadVO> getReports() {
        return reports;
    }

    public void setReports(List<FileUploadVO> reports) {
        this.reports = reports;
    }
}
